# -* - coding: UTF-8 -* -
#import sys 
#reload(sys)
#sys.setdefaultencoding('utf8')

import coop
import signal
def sigint_handler(signum, frame):
  global coop
  coop.terminate()
  print('即将退出!')


if __name__ == "__main__":
	signal.signal(signal.SIGINT, sigint_handler)
	#signal.signal(signal.SIGHUP, sigint_handler)
	signal.signal(signal.SIGTERM, sigint_handler)
	global coop
	coop = coop.Coop()
	coop.run()
	